home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2614.ZIP / CL507.ZIP / CL507.TXT < prev   
Text File  |  1990-12-18  |  72KB  |  2,253 lines

  1. ----------------------------------------------------------------------------
  2. README           About this report.
  3.  
  4.  Report Name:  CL507                                  Report Date: 12/18/90
  5.  Author: Compiled by Jo W. French dba Practical Computing of La Canada
  6.                      290 Starlight Crest Drive
  7.                      La Canada, CA 91011
  8.                      (818) 790-3699
  9.                      CompuServe ID:  74730,1751
  10.  Notes: Supercedes CL506. See Credits.   ~ indicates change from last issue.
  11.  
  12.  This report pertains to Clipper(r) 5.0. Each item herein contains the
  13.  applicable version number. It has been compiled from messages posted
  14.  on CompuServe forums from 09/15/90 through 12/17/90. The author has
  15.  verified most, but not all, of the stated anomalies. The severity of
  16.  each item is best left to the reader's judgement; however, those items
  17.  which will 'crash' the system are so noted.
  18.  
  19.  Verification Conditions.
  20.  
  21.    a) COMPILER: Clipper 5.0 version 1.03 dtd 09/15/90.
  22.    b) LINKER:  RTLINK version 3.11 as supplied by lanquage vendor.
  23.       No Incremental Linking was used.
  24.    c) SYSTEM: IBM PS/2 Model 80 with 4Mb RAM, 222 Mb Fixed Disk.
  25.    d) DOS Version: IBM DOS version 3.30.
  26.    e) CONFIG.SYS:
  27.         DEVICE=c:\dos\vdisk.sys 1536 512 128 /E
  28.         DEVICE=c:\qemm\qemm.sys RAM
  29.         SHELL=c:\command.com /E:512 /P
  30.         FILES=51
  31.         BUFFERS=8
  32.    f) ENVIRONMENT
  33.         COMSPEC=C:\COMMAND.COM
  34.         PROMPT=$p$g
  35.         PATH=C:\dos;C:\bat;C:\;C:\me;C:\ws5;F:\clipper5\bin;D:\trh;
  36.              C:\qemm;F:\ng;
  37.         LIB=F:\clipper5\lib;
  38.         INCLUDE=F:\clipper5\include;
  39.         OBJ=F:\clipper5\obj;
  40.         PLL=F:\clipper5\pll;
  41.         CLIPPER=F21;
  42.    g) EXTENDED MEMORY: 1536Kb (DOS VDISK)
  43.    h) EXPANDED MEMORY: 1536Kb (QEMM vs. 5.0)
  44.    i) TSR's: All TSR's are loaded above 9FFF using QEMM's LOADHI.
  45. ----------------------------------------------------------------------------
  46. Credits          That's Thanks Folks!
  47.  
  48.   My Thanks to the Sysops and Members of CompuServe for their
  49.   countless hours of cussing, working and losing sleep to present
  50.   solutions to the anomalies presented herein. Keep up the Good Work!
  51.  
  52.         This is NOT an official Nantucket(r) publication.
  53.  
  54.   Please report errors and ommissions to: Jo W. French  74730,1751
  55.  
  56.   Note: See Read Me
  57. ----------------------------------------------------------------------------
  58. ACOPY()           Fails to copy under certain conditions.
  59.  
  60.   Clipper Version  1.03 dtd 09/15/90.
  61.  
  62.   Problem Statement
  63.  
  64.   ACOPY() fails to copy when the 4th parameter, <nCount>, is NIL in a
  65.   parameter list; e.g., ACOPY(<aSource>, <aTarget>, , , <nTargetPosition>).
  66.  
  67.   Cause
  68.  
  69.   Unknown. <nCount> is apparently defaulting to 0 in this incidence.
  70.  
  71.   Work Around(s)
  72.  
  73.   Place a valid number in this parameter position; e.g.,
  74.   ACOPY(<aSource>, <aTarget>, , LEN(<aSource>), <nTargetPosition>).
  75.  
  76.   Notes
  77.  
  78.   ACOPY(<aSource>, <aTarget>) works satisfactorily for a complete copy.
  79.  
  80. ----------------------------------------------------------------------------
  81. AEVAL()           Undocumented return reference.
  82.  
  83.   Clipper Version  1.03 dtd 09/15/90.
  84.  
  85.   Problem Statement
  86.  
  87.   AEVAL() documentation does not mention the presence of a second return
  88.   reference; i.e., the element number.
  89.  
  90.   Cause
  91.  
  92.   Documentation omission.
  93.  
  94.   Work Around(s)
  95.  
  96.   Annotate your documentation.
  97.  
  98.   Notes
  99.  
  100.   This permits things like the following:
  101.  
  102.   AEVAL(array, { | value, element | array[element] = value * 2 } )
  103.  
  104.   which replaces each element with 2 times the original value.
  105.  
  106.   seealso "DBEVAL()"
  107.  
  108. ----------------------------------------------------------------------------
  109. ALLTRIM()         Returns runtime error if embedded in a macro.
  110.  
  111.   Clipper Version  1.03 dtd 09/15/90.
  112.  
  113.   Problem Statement
  114.  
  115.   When ALLTRIM(cVar) is included in a macro statement, a runtime
  116.   error occurs when the macro is expanded.
  117.  
  118.   Cause
  119.  
  120.   ALLTRIM(cVar) is a psuedo-function, created by directive in STD.CH; i.e.,
  121.  
  122.         #translate Alltrim(<c>)     =>   Ltrim(Trim( <c> ))
  123.  
  124.   Work Around(s)
  125.  
  126.   1) Create a real function, ALLTRIM(cVar), in your .PRG; e.g.,
  127.             FUNCTION ALLTRIM
  128.             PARAMETERS cVar
  129.             RETURN  LTRIM(TRIM(cVar))
  130.  
  131.   2) Create the above function and compile using the /N option.
  132.      Include the resultant .OBJ file when linking.
  133.      Note: You may delete the #translate line from MYNAME.CH.
  134.  
  135.   3) Create the above function and compile using the /N option.
  136.      Add the resultant .OBJ file to a .LIB file; e.g., EXTEND.LIB.
  137.      Note: You may delete the #translate line from MYNAME.CH.
  138.  
  139.   4) Replace all ALLTRIM(cVar) references in your .PRG with
  140.      LTRIM(TRIM(cVar)).
  141.  
  142.   Note
  143.  
  144.   See Support Bulletin 4 in the NANFORUM Library.
  145.  
  146.   seealso "RIGHT()" "STD.CH"
  147.  
  148. ----------------------------------------------------------------------------
  149. APPEND            'Sticks' at EOF() ??.                                    ~
  150.  
  151.   Clipper Version  1.03 dtd 09/15/90.
  152.  
  153.   Problem Statement
  154.  
  155.   The following is extracted from a message posted by ron 70671, 156:
  156.  
  157.   When appending records to a file and successfully writing to and unlocking
  158.   that record, a SKIP -1, or lookup with the SEEK command, results in the
  159.   record pointer going to EOF(). GO TOP and GO BOTTOM do not work and
  160.   neither does SKIP -1.
  161.  
  162.   Cause
  163.  
  164.   Unknown
  165.  
  166.   Work Around(s)
  167.  
  168.   Close .dbf and re-open for subsequent operations.
  169.  
  170.   Notes
  171.   Netware 386 3.1 LAN with MS-DOS 4.01 and 3.3 workstations. 35 files open.
  172.   Problem not reproducible with same database and only 4 other files open.
  173.   Index and .dbf are updated successfully.
  174.  
  175. ----------------------------------------------------------------------------
  176. ARRAYS/Externals  AADD() and ASIZE() .. Incompatible with C/ASM.           ~
  177.  
  178.   Clipper Version  1.03 dtd 09/15/90.
  179.  
  180.   Problem Statement
  181.  
  182.   If an array is declared using the form:
  183.  
  184.       LOCAL aArray := {}
  185.  
  186.   and AADD() or ASIZE() are used to size the array, the array is not
  187.   compatible with externals such as C and ASM.
  188.  
  189.   Cause
  190.  
  191.   Unknown
  192.  
  193.   Work Around(s)
  194.  
  195.   If the array is declared and sized using the form:
  196.  
  197.          LOCAL aArray[20]
  198.  
  199.   it can be used with C and ASM.
  200.  
  201. ----------------------------------------------------------------------------
  202. ASORT()           Array sort with NIL elements out of order.
  203.  
  204.   Clipper Version  1.03 dtd 09/15/90.
  205.  
  206.   Problem Statement
  207.  
  208.   When ASORT() is used on an array containing NIL elements, the last
  209.   non-NIL data will appear in the last element; e.g., AA, BB, NIL,
  210.   NIL, CC.
  211.  
  212.   Cause
  213.  
  214.   Unknown.
  215.  
  216.   Work Around(s)
  217.  
  218.   After sorting an array which contains NIL elements, perform the
  219.   following operation:
  220.  
  221.       FOR i = LEN(aArray) TO 1 STEP -1
  222.         IF aArray[i] = NIL
  223.           ADEL(aArray,i)
  224.         ENDIF
  225.       NEXT
  226.  
  227.   which will place all NIL elements at the end of the array; e.g.,
  228.   AA, BB, CC, NIL, NIL.
  229.  
  230. ----------------------------------------------------------------------------
  231. BOF()             Set to .F. on each database access.
  232.  
  233.   Clipper Version  1.03 dtd 09/15/90.
  234.  
  235.   Problem Statement
  236.  
  237.   1) BOF() is reverts to .F. each time the database is accessed; e.g.,
  238.      IF <dbf_condition> .and. BOF() will always return .F. where <dbf_
  239.      condition> might be something like IF field_data == "something".
  240.  
  241.   2) BOF() will return .T. under the following example:
  242.        USE test
  243.        GO LASTREC() + 1
  244.        ? BOF()   // => .T.
  245.  
  246.   Cause
  247.  
  248.   Unknown.
  249.  
  250.   Work Around(s)
  251.  
  252.   1) Assure that BOF() is evaluated before evaluating other database items.
  253.      In the example above, change it to read IF BOF() .and. <dbf_condition>.
  254.  
  255. ----------------------------------------------------------------------------
  256. BASE50.PLL        Pre-linking with this file may 'hang' the system.
  257.  
  258.   Clipper Version  1.03 dtd 09/15/90.
  259.  
  260.   Problem Statement
  261.  
  262.   A user, without EMS, reported that his system 'hung' when indexing a
  263.   7674 record file containing a 6 character field. He was pre-linking
  264.   BASE50.PLL
  265.  
  266.   Cause
  267.  
  268.   Unknown.
  269.  
  270.   Work Around(s)
  271.  
  272.   In the reported incident, the problem was cured by NO pre-linking
  273.   or pre-linking with Roger Donnay's, FULLBASE.PLL. See FAST50.ZIP
  274.   in NANFORUM's LIB 17.
  275.  
  276.   seealso "INDICES" "MEMORY/VMM"
  277.  
  278. ----------------------------------------------------------------------------
  279. CALL()*           Parameters are passed in reverse order.
  280.  
  281.   Clipper Version  1.03 dtd 09/15/90.
  282.  
  283.   Problem Statement
  284.  
  285.   When CALL proc WITH a, b, c is executed the receiving procedure will
  286.   receive the parameters as c, b, a.
  287.  
  288.   Cause
  289.  
  290.   Unknown.
  291.  
  292.   Work Around(s)
  293.  
  294.   Reverse order of parameter list or use extend system.
  295.  
  296.   seealso "EXTEND System"
  297. ----------------------------------------------------------------------------
  298. CLD               Debugger anomalies.
  299.  
  300.   Clipper Version  1.03 dtd 09/15/90.
  301.  
  302.   Problem Statement
  303.  
  304.     1. Linking CLD.LIB, as a LIB, does not work.
  305.     2. RESTART command does not work, gives SYNTAX ERROR.
  306.     3. PASS POINTS does not work as described in documentation.
  307.     4. LIST only lists Break Points not Watch Points and Trace Points.
  308.     5. F6 DBF file view: Moving in alist of tables when one or more is
  309.        empty or EOF() causes the debugger to bomb.
  310.     6. Only one command line parameter is recognized; i.e., when
  311.        CLD testprog par1 par2 is executed, par2 is NIL.
  312.     7. Other. See CLDBUG.ZIP in the NANFORUM LIB for 4 other anomalies;
  313.        i.e., date display, ambiquous variables, erroneous commands and
  314.        accessing the error class exported variable e.args.
  315.  
  316.   Cause
  317.  
  318.   Unknown.
  319.  
  320.   Work Around(s)
  321.  
  322.     1. Link CLD.LIB as an .OBJ; i.e., RTLINK FI yourfile, CLD.LIB
  323.     2. Unknown.
  324.     3. Use 'PASSPOINT' instead of 'PP'.
  325.     4. Unknown.
  326.     5. Pressing a menu hot key and RESTART off the menu will get things
  327.        back in order.
  328.     6. Unknown.
  329.     7. See referenced file.
  330.  
  331. ----------------------------------------------------------------------------
  332. CLOSE-UP          Problem with CLOSE-UP remote operation.
  333.  
  334.   Clipper Version  1.03 dtd 09/15/90.
  335.  
  336.   Problem Statement
  337.  
  338.   Keys not recognized when using CLOSE-UP remote operation, specifically
  339.   in MENU TO operation.
  340.  
  341.   Cause
  342.  
  343.   Incorrect CLOSE-UP settings.
  344.  
  345.   Work Around(s)
  346.  
  347.   Set CLOSE-UP keys to Advanced (requires version 3.0A).
  348.  
  349. ----------------------------------------------------------------------------
  350. COL()             Returns start of 'get' display vs end in S'87.
  351.  
  352.   Clipper Version  1.03 dtd 09/15/90.
  353.  
  354.   Problem Statement
  355.  
  356.   COL() returns the column at the start of a get display in Clipper 5.0
  357.   vis-a-vis the end of the get display in Summer '87.
  358.  
  359.   Cause
  360.  
  361.   Unknown.
  362.  
  363.   Work Around(s)
  364.  
  365.   Adjust screen display commands accordingly or use the new Get Class
  366.   functions; e.g.,
  367.  
  368.        ...
  369.        @ 0,0 say "Input" GET <var> VALID myfunc
  370.        READ
  371.  
  372.        FUNCTION myfunc
  373.        LOCAL g := getactive()
  374.        @ g:row, g:col + len(g:buffer) + 1  SAY '<CExp>'
  375.        RETURN .t.
  376.  
  377. ----------------------------------------------------------------------------
  378. COMPILER          Miscellaneous observations.                              ~
  379.  
  380.   Clipper Version  1.03 dtd 09/15/90.
  381.  
  382.   Observations
  383.  
  384.   1) IF the /P parameter is used in SET CLIPPERCMD and in the command
  385.   line, the result is no .ppo file.
  386.  
  387.   2) Fatal compiler errors, or aborting the compile, will leave, what
  388.   one user has dubbed, 'compiler turds'; i.e., compiler working files
  389.   on your disk.
  390.  
  391.   3) Reminder, per the manual, pg. 3-2, SET CLIPPERCMD or command line
  392.   options MUST be separated by a space (or the remainder will be ignored).
  393.  
  394.   4) /O Compiler Option ( Programming and Utilities Guide, pg 3-10)
  395.      If only a path is supplied, it must end with \.
  396.  
  397. ----------------------------------------------------------------------------
  398. DBEVAL()          Documentation interpretation.                            ~
  399.  
  400.   Clipper Version  1.03 dtd 09/15/90.
  401.  
  402.   Problem Statement
  403.  
  404.   DBEVAL() documentation states that DBEVAL() returns NIL. This statement
  405.   should not limit your imaginative use of this function, as illustrated
  406.   below.
  407.  
  408.   Cause
  409.  
  410.   Not Applicable.
  411.  
  412.   Work Around(s)
  413.  
  414.   Not Applicable.
  415.  
  416.   Notes:
  417.  
  418.   * This example fills a multi-dimensional array with the contents of a      ~
  419.   * .dbf file using DBEVAL and AEVAL.
  420.   * It also demonstrates the dynamic attribute of STATIC arrays and
  421.   * use of AEVAL's undocumented, second variable.
  422.  
  423.   STATIC aArray := {}
  424.   LOCAL n, y
  425.   CLS ; USE test NEW ; ASIZE(aArray,LASTREC())
  426.   DBEVAL( {|| ;
  427.     aArray[RECNO()] := {} , ASIZE(aArray[RECNO()], FCOUNT()), ;
  428.     AEVAL(aArray[RECNO()],{|x,e| aArray[RECNO(),e] := FIELDGET(e)} ) } )
  429.   USE
  430.   QOUT() ; QOUT()
  431.   AEVAL(aArray, { |x,e| AEVAL(aArray[e], { |x| QQOUT(x), QQOUT(" ") }), ;
  432.                         QOUT() })
  433.  
  434.   seealso "AEVAL()"
  435.  
  436. ----------------------------------------------------------------------------
  437. DBU               Miscellaneous anomalies.                                 ~
  438.  
  439.   Clipper Version  1.03 dtd 09/15/90.
  440.  
  441.   Problem Statement
  442.  
  443.   1) If you try to change the name of a memo field, of an existing indexed
  444.      (with DBU) database, and answer 'Yes' to the warning that 'Memos will
  445.      be lost..'; you will lose all the records in your database as well.
  446.  
  447.   2) You may end up in an 'run-away' situation (Alt C to break) in the
  448.      following set of circumstances: (Note: files containg 1000+? records)
  449.  
  450.      a) Open a database and Index with DBU.
  451.      b) (F5) Browse the database.
  452.      c) Before the screen has completely refreshed the database information,
  453.         press (F7) to perform a seek operation (select seek).
  454.      d) Enter an index key and 'Watch the fun begin'. (Thanks Kelly!)
  455.  
  456.   Cause
  457.  
  458.   Unknown.
  459.  
  460.   Work Around(s)
  461.  
  462.   Unknown.
  463.  
  464. ----------------------------------------------------------------------------
  465. SET DELETED ON    DELETED() records may still be visible.                  ~
  466.  
  467.   Clipper Version  1.03 dtd 09/15/90.
  468.  
  469.   Problem Statement
  470.  
  471.   Under certain combinations of physical file order (adjacent records),
  472.   indexing and filtering, it can be shown that DELETED() records in a file
  473.   may remain visible.
  474.  
  475.   Cause
  476.  
  477.   Unknown.
  478.  
  479.   Work Around(s)
  480.  
  481.   Test for DELETED() records; i.e.; in an example, the following showed
  482.   a deleted record. Adding .AND. .NOT. DELETED() to the filter cured the
  483.   problem. Thanks to a user for submitting test program, files, et al!
  484.  
  485.   SET DELETED ON
  486.   USE test NEW
  487.   SET INDEX TO test
  488.   SET FILTER TO .....
  489.   GO TOP
  490.   WHILE .NOT. EOF()
  491.     ? DELETED()
  492.     SKIP
  493.   END
  494.  
  495. ----------------------------------------------------------------------------
  496. DELIMITED | SDF   COPY TO or APPEND FROM anomalies.
  497.  
  498.   Clipper Version  1.03 dtd 09/15/90.
  499.  
  500.   Problem Statement
  501.  
  502.   COPY and APPEND commands, using certain delimiters, do not produce
  503.   the desired result. Further, certain APPEND FROM commands will
  504.   append junk until all available disk space is exhausted.
  505.  
  506.   Cause
  507.  
  508.   Unknown.
  509.  
  510.   Work Around(s)
  511.  
  512.   Unknown. Nantucket to supply.
  513.  
  514.   Notes:
  515.  
  516.   1) COPY commands; using SDF, DELIMITED or DELIMITED WITH comma; work.
  517.   2) APPEND commands; using SDF, DELIMITED or DELIMITED WITH comma; work,
  518.      only if the text file ends in ^^Z or <CR><LF>. Caution! APPEND will
  519.      try to append 'records' until out of disk space, causing a crash.
  520.   3) DELIMITED WITH commands, other than those above, fail to produce
  521.      the desired results. A hi-bit character will be used as the delimiter.
  522.   4) The Detroit Area Clipper Users Group BBS (313-651-7841) has a file,
  523.      DBAPPDEL.ZIP (E. Mark Kothe) which contains a program for appending
  524.      with a BLANK delimiter.
  525.  
  526. ----------------------------------------------------------------------------
  527. DIRECTORY()       Resultant array may == NIL.
  528.  
  529.   Clipper Version  1.03 dtd 09/15/90.
  530.  
  531.   Problem Statement
  532.  
  533.   The array created by the DIRECTORY() function will == NIL if no files
  534.   meet the <cDirSpec> or the <cDirSpec> is not valid.
  535.  
  536.   Work Around(s)
  537.  
  538.    Annotate your documentation. Test result for NIL.
  539.  
  540. ----------------------------------------------------------------------------
  541. ERRORSYS.PRG      Not compatible with S'87.
  542.  
  543.   Clipper Version  1.03 dtd 09/15/90.
  544.  
  545.   Problem Statement
  546.  
  547.   Clipper 5.0's ERRORSYS.PRG is incompatible with S'87 routines.
  548.  
  549.   Work Around(s)
  550.  
  551.       A user has uploaded ERRSUB.ZIP to NANFORUM to resolve differences.
  552.  
  553. ----------------------------------------------------------------------------
  554. EXTEND System     Changes made to a variable may effect other variables.
  555.  
  556.   Clipper Version  1.03 dtd 09/15/90.
  557.  
  558.   Problem Statement
  559.  
  560.   When a pointer points to more than one variable and one of the variables
  561.   is changed in an ASM or C function, the other variables may be changed.
  562.  
  563.   Work Around(s)
  564.   a) Make a local copy of the variable and pass it to the function.
  565.   b) Break the pointer relationship before passing the variable.
  566.  
  567.   Notes This subject is slightly over the author's head, so forgive
  568.             the terminology <g>.
  569.   a) The following is an abstract of a forum message on the subject:
  570.  
  571.     Fm: Pedro P. Polakoff [3PS] 73157,2412
  572.     Here is code that will demonstrate that:
  573.  
  574.        1. _parc() returns a pointer to the actual data.
  575.        2. cVar1:=cVar2:="Foobar" points both variables at the same
  576.           block of memory much as a C char * does.
  577.  
  578.     CLIPPER PORTION ---
  579.     static cVar1
  580.     static cVar2
  581.  
  582.     function str_test
  583.        cVar1:=cVar2:="Foobar"      // HERE IS THE ASSIGNMENT
  584.        QOut(cVar1,cVar2)
  585.        ChangeStr(cVar2)            // NOTE NOT PASSED BY REFERENCE
  586.        QOut(cVar1,cVar2)
  587.     return(NIL)
  588.  
  589.     C PORTION ---
  590.  
  591.     #include <extend.h>
  592.  
  593.     CLIPPER changestr()
  594.     {
  595.        char *str;
  596.        register int p;
  597.        byte q='A';
  598.  
  599.        if(PCOUNT==1 && ISCHAR(1)){
  600.           str=_parc(1);           // pointer to pointer
  601.           for(p=0;p<_parclen(1);p++){str[p]^=q;}  // directly changed
  602.        }
  603.        _ret();                    // NIL return
  604.     }
  605.   b) Another example can be found in EXTBUG.ZIP in the NANFORUM LIB 17.
  606.      Uploaded by Francois Batte 70022,3424.
  607.  
  608.   seealso "CALL()*"
  609.  
  610. ----------------------------------------------------------------------------
  611. FCREATE           Norton Guide documentation error.
  612.  
  613.   Clipper Version  1.03 dtd 09/15/90.
  614.  
  615.   Problem Statement
  616.  
  617.   FCREATE's attribute definition is incorrect in the Norton Guide.
  618.  
  619.   Work Around(s)
  620.  
  621.       Use the documentation in the manual or refer to FILEIO.CH.
  622.       The correct attributes are:
  623.           0    Create normal read/write file (default)
  624.           1    Create read-only file
  625.           2    Create hidden file
  626.           4    Create system file
  627.  
  628. ----------------------------------------------------------------------------
  629. FIELDWBLOCK()     Does not work per 'Guide' description.
  630.  
  631.   Clipper Version  1.03 dtd 09/15/90.
  632.  
  633.   Problem Statement
  634.  
  635.   FIELDWBLOCK(<cFieldName>, <nWorkArea>) does not access nWorkArea; e.g.,
  636.  
  637.     USE test1 ALIAS one NEW;  nOne:= Select()  // cFieldName is keyid
  638.     USE test2 ALIAS two NEW;  nTwo:= Select()  // cFieldName is last_name
  639.  
  640.     ? EVAL(fieldwblock ("last_name", nTwo))  // works ok.
  641.     ? EVAL(fieldwblock ("keyid", nOne))      // does not work.
  642.  
  643.   Work Around(s)  as submitted by MIKE SCHINKEL 73567,3612.
  644.  
  645.     USE test1 ALIAS one NEW;  nOne:= Select()
  646.     USE test2 ALIAS two NEW;  nTwo:= Select()
  647.  
  648.     ? one->( EVAL( FieldWBlock( "keyid", nOne ) ) )        // Both these
  649.     ? ( nOne )->( EVAL( FieldWBlock( "keyid", nOne ) ) )   // are same.
  650.  
  651.     ? two->( EVAL( FieldWBlock( "last_name", nTwo ) ) )      // Both these
  652.     ? ( nTwo )->( EVAL( FieldWBlock( "last_name", nTwo ) ) ) // are same.
  653.  
  654.   Notes
  655.  
  656.   A description of FIELDWBLOCK's behaviour, as submitted by Manuel
  657.   Gonzalez 71121,1442, is as follows:
  658.  
  659.   1) If the work-area number fed to FIELDWBLOCK is the same as the current
  660.      work area and the field exists, it returns the field's value when
  661.      it's EVALuated.
  662.  
  663.   2) If the work-area number fed to FIELDWBLOCK is the same as the current
  664.      work area and the field does not exist, it returns NIL.
  665.  
  666.   3) If the work-area number fed to FIELDWBLOCK is not the same as the
  667.      current work area and the field does not exist in the work area
  668.      specified, ERRORSYS says: "Variable does not exist: (fieldname)."
  669.  
  670.   4) If the work-area number fed to FIELDWBLOCK is not the same as the
  671.      current work area and the field DOES exist in the work area spe-
  672.      cified, FIELDWBLOCK returns NIL.  EVALuating FIELDWBLOCK bombs.
  673.  
  674.  
  675. ----------------------------------------------------------------------------
  676. GETSYS.PRG        Modifications and corrections.                           ~
  677.  
  678.   Clipper Version  1.03 dtd 09/15/90.
  679.  
  680.   Problem Statements
  681.  
  682.   1) Unable to enter characters having an ASCII value > 127 in GET's.
  683.  
  684.   2) Control W or Control End exits getlist.
  685.  
  686.   3) Unable to enter negative decimal numbers using decimal point
  687.      movement.
  688.  
  689.   4) When a GET ... WHEN <lCond> command is issued and a condition dependent
  690.      entry is at the top or bottom of the getlist, the system appears to
  691.      lock up.
  692.  
  693.   5) An 'unselected' color setting is ignored until the GET is entered       ~
  694.      and exited.
  695.  
  696.   Cause
  697.  
  698.   1) Line 413 of an unmodified GETSYS.PRG reads as follows:
  699.           if (nKey >= 32 .and. nKey <= 127)
  700.  
  701.   2) GETSYS.PRG option
  702.  
  703.   3) Unknown.
  704.  
  705.   4) GETSYS.PRG programming error.
  706.  
  707.   5) Unknown.
  708.  
  709.   Work Arounds
  710.  
  711.   1) Line 413 may be edited, with caution, to permit a greater range of
  712.      entries. Check for conflicts with any SET KEY's or SET FUNCTION's.
  713.      GETSYS.PRG should be compiled and linked with your .PRG.
  714.  
  715.   2) The GETSYS.PRG has an #ifdef NOTDEF in the program. If you
  716.      #define NOTDEF at the beginning of the file, CTRL W and CTRL END
  717.      will move to the last valid item of the getlist.
  718.  
  719.   3) Enter negative decimal numbers, with PICTURE template #, as
  720.      spaces up to the position before the decimal point, then minus,
  721.      then number OR enter minus, then zeros until cursor jumps past
  722.      decimal point, then number.
  723.  
  724.   4) The following changes to GETSYS.PRG will correct the problem.
  725.  
  726.   5) Unknown.
  727.  
  728.   Note: This group of changes should be ignored if the 'Ira' fixes,
  729.   below, are incorporated.
  730.   ********************************************************************
  731.  
  732.      The changes commence at line 242 of the original program.
  733.  
  734. // 242    if (localReadExit)
  735.             i := 0
  736. // 244    else
  737. // 245      i := 0
  738. // 246      direction := BACKWARD
  739. // 247    end
  740.         end
  741.       else
  742.         if ( --i < 1 )
  743.           * going backward, at top of getlist
  744.           if (localReadExit)
  745.             i := 0
  746.           else
  747.             i := 2                  // changed 255, was i := 1
  748.  
  749.   ********************************************************************
  750.      GETSYS.PRG should be compiled with the /N option and linked with
  751.      your .PRG.
  752.  
  753.   Note: The following changes to GETSYS.PRG have been submitted by
  754.   Ira Emus (76702,672) to 'fix a bunch of anomalies you might find when
  755.   using the WHEN keyword.' :
  756.  
  757.   ********************************************************************
  758.   186  LOCAL nKey := 0, cKey     // change
  759.   242   IF (LocalReadExit) .OR. nKey == K_ENTER   // change
  760.   246   i := nLen-1               // change
  761.   256   i := 2                    // change
  762.   334     new := if( localReadExit, 0, 1 )     // reference
  763.   335     GetExitRequested := new == 0         // Add
  764.   341     new := if( localReadExit, 0, nLen )  // reference
  765.   348     GetExitRequested := new == 0         // Add
  766.   183    local g, passcount := 0         // change
  767.   246    direction := BACKWARD           // reference
  768.   247    passcount++                     // add
  769.   256    direction := FORWARD            // reference
  770.   257    passcount++                     // add
  771.   260      IF passcount = 2              // add
  772.   261         i := 0                     // add
  773.   262      ENDIF                         // add
  774.   263      loop                          // reference
  775.   264    end                             // reference
  776.   265    passcount := 0                  // add
  777.   260   g:display()   // Add
  778.   261   loop          // reference
  779.   ********************************************************************
  780.  
  781.   The above 'Ira' changes have been 're-ordered' by another user
  782.   as follows:
  783.  
  784. "The changes are reordered so that the added lines are in reverse
  785. order so that line numbers don't change their reference line number.
  786. 183->182 means 'Ira' code showed line 183 but it should have been 182.
  787.  
  788. Changed Lines:
  789. 183->182   local g, passcount := 0                  // change
  790. 186->185  LOCAL nKey := 0, cKey                     // change
  791. 242       IF (LocalReadExit) .OR. nKey == K_ENTER   // change
  792. 246->245  i := nLen-1               // change
  793. 256->255  i := 2                    // change
  794.  
  795. Added Lines:
  796. 341->334  new := if( localReadExit, 0, nLen )  // reference
  797. 348->335  GetExitRequested := new == 0         // Add
  798. 334->327  new := if( localReadExit, 0, 1 )     // reference
  799. 335->328  GetExitRequested := new == 0         // Add
  800.  
  801. These 7 line numbers are difficult to tell exactly where g:display()
  802. goes since two changes were made here.  They've been combined.
  803.  
  804. Original code reference:
  805. 263->260     loop                          // reference
  806. 264->261   end                             // reference
  807.  
  808. After additions (with new line numbers for loop and end).
  809. 260          IF passcount = 2              // add
  810. 261             i := 0                     // add
  811. 262          ENDIF                         // add
  812. 260->263     g:display()                   // add
  813. 263->264     loop                          // reference
  814. 264->265   end                             // reference
  815. 265->266   passcount := 0                  // add
  816.  
  817. These four lines are correct.
  818. 256        direction := FORWARD            // reference
  819. 257        passcount++                     // add
  820. 246        direction := BACKWARD           // reference
  821. 247        passcount++                     // add   "
  822.  
  823.   Note
  824.   Author's note: I think the 'differences' may be due to Version 1.02 vs.
  825.   1.03 - hope everyone can decipher 'em. Thanks to Ira!
  826.  
  827.   seealso "\SOURCE\SYS" "READ" "PICTURE"
  828.  
  829. ----------------------------------------------------------------------------
  830. Get:Delete()      Documentation omission.
  831.  
  832.   Clipper Version  1.03 dtd 09/15/90.
  833.  
  834.   Problem Statement
  835.  
  836.   Get:Delete() Syntax is not in documentation.
  837.  
  838.   Cause
  839.  
  840.   Documentation omission.
  841.  
  842.   Work Around(s)
  843.  
  844.   Annotate your documentation to add the definition to the GET Class,
  845.   Cursor Movement Methods definitions
  846.  
  847.    delete()     Deletes the character under the cursor
  848.  
  849. ----------------------------------------------------------------------------
  850. GetNew()          Error in syntax documentation.
  851.  
  852.   Clipper Version  1.03 dtd 09/15/90.
  853.  
  854.   Problem Statement
  855.  
  856.   GetNew() Syntax is not correct in documentation.
  857.  
  858.   Cause
  859.  
  860.   Error in documentation.
  861.  
  862.   Work Around(s)
  863.  
  864.   Edit your documentation to reflect the correct syntax:
  865.  
  866.     GetNew([<nRow>], [<nCol>], [<bBlock>],[<cGetVar>],[<cPicture>],
  867.            [<cColorSpec>]) --> objGet
  868.  
  869. ----------------------------------------------------------------------------
  870. Get:VarGet()      Get Class, missing manual documentation.
  871.  
  872.   Clipper Version  1.03 dtd 09/15/90.
  873.  
  874.   Problem Statement
  875.  
  876.   The definition of VarGet() is missing from the manual, but included
  877.   in the Norton(r) Guide.
  878.  
  879.   Cause
  880.  
  881.   Ommission.
  882.  
  883.   Work Around(s)
  884.  
  885.   Annotate your manual to include VarGet() as follows:
  886.  
  887.   varGet()        Returns the current value of the Get variable               ^r^CEA^r
  888.  
  889.   varGet() --> GetVarValue
  890.  
  891.    Returns the current value of the Get variable.  For simple Get
  892.    variables this is equivalent to executing Get:block:
  893.  
  894.    aGet:varGet() == EVAL(aGet:block)
  895.  
  896.    However, if the Get variable is an array element, EVAL(aGet:block)
  897.    will not return the value of the Get variable; in this case use of
  898.    varGet() is required.  An example of varGet() may be found in the
  899.    READMODAL() function, defined in Getsys.prg.
  900.  
  901. ----------------------------------------------------------------------------
  902. Get:VarPut()      Get Class, missing manual documentation.
  903.  
  904.   Clipper Version  1.03 dtd 09/15/90.
  905.  
  906.   Problem Statement
  907.  
  908.   The definition of VarPut() is missing from the manual, but included
  909.   in the Norton(r) Guide.
  910.  
  911.   Cause
  912.  
  913.   Ommission.
  914.  
  915.   Work Around(s)
  916.  
  917.   Annotate your manual to include VarPut() as follows:
  918.  
  919.   varPut()        Sets the Get variable to the passed value                   ^r^CEA^r
  920.  
  921.   varPut() --> Value
  922.  
  923.    Sets the Get variable to the passed value.  For simple Get variables
  924.    this is equivalent to executing Get:block with an argument:
  925.  
  926.    aGet:varPut(aValue) == EVAL(aGet:block, aValue)
  927.  
  928.    However, if the Get variable is an array element, EVAL(aGet:block,
  929.    aValue) will not set the value of the Get variable; in this case use
  930.    of varPut() is required.
  931.  
  932. ----------------------------------------------------------------------------
  933. IF(<exp>)         Use with caution with commands and statements.
  934.  
  935.   Clipper Version  1.03 dtd 09/15/90.
  936.  
  937.   Problem Statement
  938.  
  939.   IF(<exp>) will be pre-processed as though it was the IF command and
  940.   a compiler error will occur; e.g.,
  941.  
  942.      SET RELATION TO field + IF(<exp)) ...
  943.  
  944.   Cause
  945.  
  946.   Pre-processor action
  947.  
  948.   Workaround(s)
  949.  
  950.   1)  Use IIF() instead of IF()
  951.   2)  Make IF() into an expression; e.g., field + (IF(<exp>))
  952.  
  953. ----------------------------------------------------------------------------
  954. IF nX == 0        May return incorrect logic.
  955.  
  956.   Clipper Version  1.03 dtd 09/15/90.
  957.  
  958.   Problem Statement
  959.  
  960.   Given the assignment, nX := 0.6, the test, IF (nX == 0) will return
  961.   true.
  962.  
  963.   Cause
  964.  
  965.   Unknown.
  966.  
  967.   Workaround(s)
  968.  
  969.   1)  IF nX == 0.0  works ok.
  970.   2)  IF 0 == nX   or  IF 0.0 == nX  work ok.
  971.   3)  IF | IFF( nX == 0, action1, action2 ) work ok.
  972.   4)  IF ROUND( nX, 2 ) == ROUND( 0, 2 ) works ok.
  973.  
  974. ----------------------------------------------------------------------------
  975. INCREMENT         RTlink option, problems.
  976.  
  977.   Clipper Version  1.03 dtd 09/15/90.
  978.  
  979.   Problem Statement
  980.  
  981.   Users have reported problems when attempting to use the Incremental
  982.   Linking feature of RTLINK.
  983.  
  984.   Cause
  985.  
  986.   Unknown.
  987.  
  988.   Work Around(s)
  989.  
  990.   Avoid the use of this feature until a fix is available.
  991.  
  992. ----------------------------------------------------------------------------
  993. INDICES           Numerous reported problems.
  994.  
  995.   Clipper Version  1.03 dtd 09/15/90.
  996.  
  997.   Problem Statement
  998.  
  999.   Numerous reported problems re' indices; e.g., SEEK's, SET RELATION TO's
  1000.   and PACK's. Numerical indices containing appended blanks are out of
  1001.   order. Indexing on a child relation will destroy the child's index.
  1002.  
  1003.   Cause
  1004.  
  1005.   Unknown.
  1006.  
  1007.   Work Around(s)
  1008.  
  1009.   Unknown. Suggest use of character type index keys. The following
  1010.   function will handle negative numbers and treat blanks as zeros.
  1011.  
  1012.   FUNCTION num2str(nNumber)
  1013.   RETURN ( PADL(LTRIM(STR(IF(nNumber<0,ABS(1/nNumber),nNumber),;
  1014.          LEN(STR(nNumber))+2,LEN(STR(nNumber))-AT(".",STR(nNumber))+2)),;
  1015.          LEN(STR(nNumber))+2,IF(nNumber<0,"-","0")) )
  1016.  
  1017.   A workaround for indexing on a child's data is to use a UDF. Example:
  1018.  
  1019.       SELECT 2
  1020.       USE test2 ALIAS S
  1021.       INDEX ON key_id TO test2
  1022.       SELECT 1
  1023.       USE test1 ALIAS P
  1024.       INDEX ON RELFUNC(P->key_id) TO test1
  1025.  
  1026.       FUNCTION RELFUNC(idkey)
  1027.       LOCAL cRetVal
  1028.       SELECT 2
  1029.       SEEK idkey
  1030.       cRetVal = IF( !S->(EOF()), S->last_name+S->first_name,;
  1031.                     SPACE(LEN(S->last_name+S->first_name)) )
  1032.       SELECT 1
  1033.       RETURN cRetVal
  1034.  
  1035.   Note:  The index file created by indexing on a number field has a
  1036.   different internal representation depending upon whether the file was
  1037.   created by Summer '87 or Clipper 5.0.
  1038.  
  1039.   seealso "MEMORY/VMM" "PACK" "SET RELATION"
  1040.  
  1041. ----------------------------------------------------------------------------
  1042. INSTALL           Installation Problems
  1043.  
  1044.   See Support Bulletins 1 and 2 in NANFORUM LIB 16.
  1045.  
  1046. ----------------------------------------------------------------------------
  1047. LABEL FORM        A runtime error occurs on second execution.
  1048.  
  1049.   Clipper Version  1.03 dtd 09/15/90.
  1050.  
  1051.   Problem Statement
  1052.  
  1053.   If the user attempts to execute a second label report, a runtime
  1054.   (assignment) error will occur.
  1055.  
  1056.   Cause
  1057.  
  1058.   LBLRUN.PRG programming error.
  1059.  
  1060.   Work Around(s)
  1061.  
  1062.   Edit lines 115 to 119 of the original LBLRUN.PRG as follows:
  1063.  
  1064.      aLabelData := {}
  1065.      aBandToPrint := {}
  1066.      nCurrentCol := 1
  1067.      cBlank := ""
  1068.      lOneMoreBand := .T.
  1069.  
  1070.   Re-compile and link with programs requiring LABEL FORM.
  1071.  
  1072.   seealso "NOCONSOLE" "SET CONSOLE"
  1073.  
  1074. ----------------------------------------------------------------------------
  1075. LOCAL             Inline assignment clarification.
  1076.  
  1077.   Clipper Version  1.03 dtd 09/15/90.
  1078.  
  1079.   Clarification:
  1080.  
  1081.   Inline assignments of the following form:
  1082.  
  1083.      LOCAL a := b := c:= 0
  1084.  
  1085.   result in LOCAL a and PRIVATE b and c
  1086.  
  1087. ----------------------------------------------------------------------------
  1088. MANUAL            Missing documentation.
  1089.  
  1090.   Clipper Version  1.03 dtd 09/15/90.
  1091.  
  1092.   As noted in the README file, the following function or statement
  1093.   definitions are missing from the manual:
  1094.  
  1095.  BREAK()        Branch out of a BEGIN SEQUENCE...END construct            F
  1096.  DECLARE*       Create and initialize private memory variables and arrays S
  1097.  DEVOUT()       Write a value to the current device                       F
  1098.  FIELDBLOCK()   Return a set-get code block for a field variable          F
  1099.  FIELDGET()     Retrieve the value of a field variable                    F
  1100.  FIELDPUT()     Set the value of a field variable                         F
  1101.  FIELDWBLOCK()  Return a set-get block for a field in a given work area   F
  1102.  GETACTIVE()    Return the currently active Get object                    F
  1103.  MEMVARBLOCK()  Return a set-get code block for a given memory variable   F
  1104.  OUTERR()       Write a list of values to the standard error device       F
  1105.  OUTSTD()       Write a list of values to the standard output device      F
  1106.  SETBLINK()     Toggle asterisk (*) interpretation in SETCOLOR()          F
  1107.  SETMODE()      Change display mode to specified number of rows, columns  F
  1108.  
  1109.   Note: These definitions have been uploaded as MAN001.TXT and MAN002.TXT
  1110.         in the NANFORUM library.
  1111.  
  1112.   The following match-marker description is also missing from the manual:
  1113.  
  1114.      <(idMarker)>             Extended Expression match-marker
  1115.      ─────────────────────────────────────────────────────────────────
  1116.       Extended Expression match-marker:  matches a regular or
  1117.       extended expression, including a filename or path specification. It
  1118.       is used in combination with the smart stringify result-marker to
  1119.       assure that extended expressions won't get stringified, while
  1120.       normal, unquoted string file specifcations will.
  1121.  
  1122. ----------------------------------------------------------------------------
  1123. MEMORY/VMM        Numerous reported VMM crashes.
  1124.  
  1125.   Clipper Version  1.03 dtd 09/15/90.
  1126.  
  1127.   Problem Statement
  1128.  
  1129.   Numerous problems have been reported re' memory related crashes.
  1130.  
  1131.   Cause
  1132.  
  1133.   Unknown.
  1134.  
  1135.   Work Around(s)
  1136.  
  1137.   Unknown, however:
  1138.  
  1139.   a) One user, Pedro P. Polakoff [3PS] 73157,2412 reports:
  1140.      Anyone who is having problems with the VMM error: 5317 (Swap space
  1141.      exhausted), especially when using linker's other than RTLink, can
  1142.      solve the problem by using the following function call:
  1143.  
  1144.         Function VMMKickStart()
  1145.           local cDummy:=Space(8000)       // Warplink Base
  1146.           -- or --
  1147.           local cDummy:=Space(16000)      // Blinker Base
  1148.         return(NIL)
  1149.  
  1150.      as the very first executed line of your program.
  1151.  
  1152.   b) If the system locks up when indexing, and you linked WITH
  1153.      BASE50.PLL, try linking WITHOUT BASE50.PLL or linking with
  1154.      Roger Donnay's suggested FULLBASE.PLL. (See FAST50.ZIP in
  1155.      NANFORUM LIB 17, New Uploads.)
  1156.  
  1157.   Notes
  1158.  
  1159.   See Support Bulletins 3 and 4 in NANFORUM LIB 16.
  1160.  
  1161. ----------------------------------------------------------------------------
  1162. MENU TO w/SETKEY  Setkey() receives incorrect parameters.
  1163.  
  1164.   Clipper Version  1.03 dtd 09/15/90.
  1165.  
  1166.   Problem Statement
  1167.  
  1168.   The set key procedure does not receive the correct parameters for
  1169.   cproc, cline and, cvar.
  1170.  
  1171.   Cause
  1172.  
  1173.   Unknown.
  1174.  
  1175.   Work Around(s)
  1176.  
  1177.   1) Tech support at Nantucket suggests the following work around to be
  1178.      placed at the top of all setkey() procedures :
  1179.  
  1180.      if procname(3) == "__MENUTO"
  1181.        cproc := procname(4)
  1182.      else
  1183.        cproc := procname(3)
  1184.      endi
  1185.  
  1186.   2) The following alternative(s) have been suggested by a user.
  1187.  
  1188.      First create an #include file called BUGFIX.CH as follows:
  1189.  
  1190.        #define FIXCPROC   procname(if(procname(3)=='__MENUTO',4,3))
  1191.        #define FIXCLINE   procline(if(procname(3)=='__MENUTO',4,3))
  1192.        #define FIXCVAR    readvar()
  1193.  
  1194.      and modify your set key procedure by placing the following at the
  1195.      top of each procedure:
  1196.  
  1197.        cproc := FIXCPROC
  1198.        cline := FIXCLINE
  1199.        cvar  := FIXCVAR
  1200.  
  1201.                               OR (Combination of above.)
  1202.  
  1203.        #define FIXCPASS(x,y,z);
  1204.              x := procname(if(procname(3)=='__MENUTO',4,3)) ;;
  1205.              y := procline(if(procname(3)=='__MENUTO',4,3)) ;;
  1206.              z := readvar()
  1207.  
  1208.      Place the following at the top of setkey procedures:
  1209.  
  1210.        FIXCPASS(cproc,cline,cvar)
  1211.  
  1212.   seealso "PROCNAME()"
  1213.  
  1214. ----------------------------------------------------------------------------
  1215. MISC              Miscellaneous clarification/anomalies.                   ~
  1216.  
  1217.   Clipper Version  1.03 dtd 09/15/90.
  1218.  
  1219.   a) CL.BAT (Support Bulletin S50004.TXT)
  1220.      This batch file was not supplied with Clipper 5.0.
  1221.      Here are the intended contents:
  1222.  
  1223.       CLIPPER %1
  1224.       RTLINK FI %1
  1225.  
  1226.   b) NDX File Support ( Card contained with Clipper 5.0 )
  1227.      You must request this feature from Nantucket(r). Not available
  1228.      as of late November.
  1229.  
  1230.   c) SETBLINK(), SETMODE() (NG Function Descriptions)
  1231.      These are environmental or screen attributes; hence, they may
  1232.      change the full screen when invoked. SETMODE() should be followed
  1233.      by a CLS or CLEAR SCREEN. You may want to save the screen before
  1234.      invoking either of these functions.
  1235.  
  1236.   d) MEMVARBLOCK() (NG Function Description)
  1237.      MEMVARBLOCK() cannot be used to create set-get blocks for LOCAL
  1238.      or STATIC variables.
  1239.  
  1240.   e) A 'splash of color' may remain at 0, 65 after using SETCOLOR()
  1241.      and GET. This can be eliminated by SET SCOREBOARD OFF.
  1242.  
  1243.   f) Code block parameter visibility - documentation anomaly.
  1244.      Page 1-21 of the Clipper 5 Reference, last sentence, 2nd paragraph
  1245.      reads: "....a declaration that occurs within a code block (a block
  1246.      parameter), applies to that code block and any code blocks nested
  1247.      within it.". The block parameter IS NOT visible to nested code blocks,
  1248.      unless you pass it.
  1249.  
  1250.   g) In certain incidences, terminating a macro expression with a period,
  1251.       '.', does not work; e.g.,
  1252.         FUNCTION IndexFile(cKey, cIndexName)
  1253.            INDEX ON &cKey. TO (cIndexName)
  1254.            RETURN (NIL)
  1255.      Result: Compiler "Error C2081 Macro of declared symbol: '&cKey.'
  1256.  
  1257.   h) Menu.prg example on page 1-2 of the Reference Manual has as its
  1258.      first line '#include "Database.prg" ...'. This directive should
  1259.      be placed at the end of the program (it includes generic database
  1260.      functions).
  1261.  
  1262.   i) Cursor anomalies. Try using SET CLIPPER=CGACURS if you are
  1263.      experiencing cursor anomalies. Reference: NG Environment.
  1264.  
  1265.   j) Re-direction. Clipper 5.0 does not accept command line parameters
  1266.      re-directed from a text file; e.g.  CLIPPROG  < TEXTFILE.
  1267.  
  1268.   k) Internal Error Numbers are not documented.
  1269.  
  1270.   l) STATIC arrays. Documentation anomaly, pg. 1-57. Contrary to the
  1271.      documentation, STATIC arrays are also dynamic.
  1272.  
  1273.   m) The following program results in a run-time error because x was not
  1274.      initialized; however, the error message, "Error BASE/1087  Argument
  1275.      error: -- " should reference ++ instead.
  1276.  
  1277.               function main
  1278.               local x
  1279.               x++
  1280.               return nil
  1281.  
  1282. ----------------------------------------------------------------------------
  1283. MULTI-STATEMENT   Multi-statement lines, CAUTION.
  1284.  
  1285.   Clipper Version  1.03 dtd 09/15/90.
  1286.  
  1287.   Problem Statement
  1288.  
  1289.   When using multiple statements on one programming line; i.e.;
  1290.   separating commands with a semi-colon; there are several commands
  1291.   which will cause erroneous results, if they are not at the end of
  1292.   line.
  1293.  
  1294.   Cause
  1295.  
  1296.   Pre-processor action.
  1297.  
  1298.   Work Around(s)
  1299.  
  1300.   Make sure that the following commands, if used, appear at the end
  1301.   of the line, ONLY.
  1302.  
  1303.   ENDDO    <*x*>             SET STEP <*x*>
  1304.   ENDIF    <*x*>             SET SAFETY <*x*>
  1305.   ENDCASE  <*x*>             SET TALK <*x*>
  1306.   ENDFOR   <*x*>             SET PATH TO <*path*>
  1307.   SET ECHO <*x*>             SET COLOR TO  <*spec*>
  1308.   SET HEADING <*x*>          SET COLOUR TO <*spec*>
  1309.   SET MENU <*x*>             RUN <*cmd*>
  1310.   SET STATUS <*x*>           ! <*cmd*>
  1311.  
  1312.   COPY   TO   <(file)>  DELIMITED  WITH <*delim*>
  1313.   APPEND FROM <(file)>  DELIMITED  WITH <*delim*>
  1314.  
  1315.   seealso "STD.CH" "DELIMITED | SDF" "SET COLOUR"
  1316.  
  1317. ----------------------------------------------------------------------------
  1318. Numerics          Problem with numbers > 2 ** 31.
  1319.  
  1320.   Clipper Version  1.03 dtd 09/15/90.
  1321.  
  1322.   Problem Statement
  1323.  
  1324.   Certain large numbers, entered as variables, return unexpected
  1325.   values. Examples:
  1326.  
  1327.           Assignment                 ? nVar
  1328.  
  1329.   nVar := 4503599627436033   =>  4503599627436033
  1330.   nVar := 4503599627436032   =>  4503599627436032
  1331.   nVar := 4503599627436031   =>  65535
  1332.   nVar := 4503599627403264   =>  35868
  1333.   nVar := 4503599627403263   =>  32767
  1334.   nVar := 4503599627370498   =>  2
  1335.   nVar := 4503599627370497   =>  1
  1336.   nVar := 4503599627370496   =>  0    // 2 ** 54
  1337.   nVar := 4503599627370495   => -1
  1338.   nVar := 4503599627370494   => -2
  1339.   nVar := 4503599627337729   => -32767
  1340.   nVar := 4503599627337728   =>  4503599627337728
  1341.   nVar := 4503599627337727   =>  4503599627337727
  1342.  
  1343.  
  1344.   Cause
  1345.  
  1346.   Unknown.
  1347.  
  1348.   Work Around(s)
  1349.  
  1350.   Append '.0' to the variable at assignment; e.g.,
  1351.  
  1352.     nVar := 4503599627370496.0  =>  4503599627370496.0
  1353.  
  1354.   Notes
  1355.  
  1356.   The above example 'ranges' about 2 ** 54. Similar, but not identical,
  1357.   results will occur when nVar > 2 ** 31. Attempts to assign nVar as
  1358.   ROUND(nNumber,nPlaces) or nNumber * 1.0 failed to cure the problem;
  1359.   however, if nVar is created as a result of say 2 ** 32, the assignment
  1360.   appears to be correct.
  1361.  
  1362. ----------------------------------------------------------------------------
  1363. NG MODE           Un-documented Norton(r) Guide Mode.
  1364.  
  1365.   Clipper Version  1.03 dtd 09/15/90.
  1366.  
  1367.   Problem Statement
  1368.  
  1369.   NG can be executed in a mode which will permit it to unload from
  1370.   memory when F10 or Escape is used to exit the program.
  1371.  
  1372.   Cause
  1373.  
  1374.   Documentation omission.
  1375.  
  1376.   Work Around(s)
  1377.  
  1378.   Enter NG TEST.NG at the DOS prompt. When NG receives the specific
  1379.     parameter TEST.NG, it will load in the above described mode.
  1380.     Annotate your documentation.
  1381.  
  1382.   Note TEST.NG is the specific parameter to be used. This is NOT
  1383.   the name of an existing file.
  1384.  
  1385. ----------------------------------------------------------------------------
  1386. NOCONSOLE         Not documented as REPORT | LABEL FORM option.
  1387.  
  1388.   Clipper Version  1.03 dtd 09/15/90.
  1389.  
  1390.   Problem Statement
  1391.  
  1392.   NOCONSOLE parameter to REPORT | LABEL FORM .. commands is missing.
  1393.  
  1394.   Cause
  1395.  
  1396.   Syntactical ommissions in documentation. Note: FRMRUN.PRG | LBLRUN.PRG
  1397.   programming uses the presence | absence of a NOCONSOLE parameter to
  1398.   SET CONSOLE accordingly. See SET CONSOLE for re-programming solutions.
  1399.  
  1400.   Work Around(s)
  1401.  
  1402.   1) Change documentation to reflect addition of this parameter:
  1403.     REPORT | LABEL FORM <xcReport> [TO PRINTER] [TO FILE <xcFile>][<scope>]
  1404.     [WHILE <lCondition>] [FOR <lCondition>][PLAIN | HEADING <cHeading>]
  1405.     [NOEJECT] [SUMMARY] [NOCONSOLE]
  1406.  
  1407. ----------------------------------------------------------------------------
  1408. OS()              Does not return user's operating system.
  1409.  
  1410.   Clipper Version  1.03 dtd 09/15/90.
  1411.  
  1412.   Problem Statement
  1413.  
  1414.   OS() returns the operating system programmed into EXAMPLP.PRG.
  1415.  
  1416.   Cause
  1417.  
  1418.   Incorrect documentation or non-implementation of function.
  1419.  
  1420.   Work Around(s)
  1421.  
  1422.   1) Change documentation to reflect true action of this function.
  1423.   2) Edit EXAMPLEP.PRG to reflect the desired system, compile and
  1424.      link with your program.
  1425.  
  1426. ----------------------------------------------------------------------------
  1427. PACK              PACK's with multiple open indices may fail.
  1428.  
  1429.   Clipper Version  1.03 dtd 09/15/90.
  1430.  
  1431.   Problem Statement
  1432.  
  1433.   PACK's with multiple indices may fail. The BADPAC.ZIP file on
  1434.   NANFORUM illustrates the problem.
  1435.  
  1436.   Cause
  1437.  
  1438.   Unknown. Suspect indexing procedure.
  1439.  
  1440.   Work Around(s)
  1441.  
  1442.   Close indices before PACKing. Re-index the files, using INDEX ON rather
  1443.   than REINDEX. Some users recommend erasing the index files prior to
  1444.   usage of the INDEX ON. Otherwise, design your program so that PACK's
  1445.   are not required.
  1446.  
  1447.   seealso "REINDEX" "INDICES"
  1448.  
  1449. ----------------------------------------------------------------------------
  1450. PICTURE           Anomalies with the PICTURE clause.
  1451.  
  1452.   Clipper Version  1.03 dtd 09/15/90.
  1453.  
  1454.   Problem Statement
  1455.  
  1456.   1) PICTURE "Y"      May return lowercase, if character type variable.
  1457.       Using @ <row>, <col> GET <cVar> PICTURE "Y"  OR
  1458.       Using @ <row>, <col> SAY <cString> GET <cVar> PICTURE "Y"
  1459.       will not force UPPER(cVar); i.e., cVar returned will be the same
  1460.       case as entered by the user.
  1461.  
  1462.   2) PICTURE "@R <template> may not produce the desired results, per
  1463.      the following example:
  1464.      Using @ <row>, <col> SAY "abcdefgh" PICTURE "@R X_X_X_X_X_X_X_X"
  1465.      produces a_b_c_defgh.
  1466.  
  1467.   3) The PICTURE clause may truncate a variable but will not increase
  1468.      it's length. Examples:
  1469.  
  1470.         cVar := ""
  1471.         @ row, col get cVar PICTURE "!!!!!"   // Does not work.
  1472.  
  1473.         cVar := SPACE(10)
  1474.         @ row, col get cVar PICTURE "!!!!!"   // Will truncate cVar.
  1475.  
  1476.   Cause
  1477.  
  1478.   1) Not implemented in STD.CH
  1479.  
  1480.   2) Unknown.
  1481.  
  1482.   3) Unknown.
  1483.  
  1484.   Work Around(s)
  1485.  
  1486.   1) Place the following line at the beginning of your program or
  1487.      at the end of MYNAME.CH
  1488.  
  1489.         #translate PICTURE "Y" => PICTURE "@! Y"
  1490.  
  1491.   2) Format the string through other means. It appears that this template
  1492.      will work if four or less items of the input string are to be
  1493.      formatted at a time; i.e., "8185551212" to "@R (999)999-9999" works
  1494.      satisfactorily.
  1495.  
  1496.   3) Exercise caution in programming.
  1497.  
  1498.   seealso "STD.CH"
  1499.  
  1500. ----------------------------------------------------------------------------
  1501. PROCNAME()        Returns wrong value when in SET KEY procedure.
  1502.  
  1503.   Clipper Version  1.03 dtd 09/15/90.
  1504.  
  1505.   Problem Statement
  1506.  
  1507.   When PROCNAME() is called from within a SET KEY procedure, the wrong
  1508.   procedure name is returned.
  1509.  
  1510.   Cause
  1511.  
  1512.   Unknown.
  1513.  
  1514.   Work Around(s)
  1515.  
  1516.   1) Modify your program to use some other method of identifying
  1517.      'where you are' for HELP routines, etc.
  1518.  
  1519.   seealso "MENU TO w/SETKEY"
  1520.  
  1521. ----------------------------------------------------------------------------
  1522. RANGE             Compiler errors.
  1523.  
  1524.   Clipper Version  1.03 dtd 09/15/90.
  1525.  
  1526.   Problem Statements
  1527.  
  1528.   1) RANGE compiler error (C2010) when GET <Var> is an array element.
  1529.  
  1530.     Using @ <row>, <col> GET <Var> RANGE <lo>, <hi>   OR
  1531.     Using @ <row>, <col> GET <Var> PICTURE .. RANGE <lo>, <hi> OR
  1532.     Using @ <row>, <col> SAY <cString> GET <Var> PICTURE .. RANGE <hi>, <lo>
  1533.  
  1534.     returns a compiler error if the <Var> is an array element.
  1535.  
  1536.   2) WHEN RANGE  ( Not Implemented, contrary to documentation.)
  1537.  
  1538.     Using @ <row>, <col> GET <Var> PICTURE .. WHEN <cond> RANGE <lo>, <hi>
  1539.                              OR
  1540.     Using @ <row>, <col> SAY <cString> GET <Var> PICTURE .. WHEN <cond> ;
  1541.     RANGE <hi>, <lo>
  1542.  
  1543.     returns a compiler error, whereas the documentation reflects that
  1544.     RANGE | VALID may be used.
  1545.  
  1546.   Cause
  1547.  
  1548.   1) Pre-processor action.
  1549.   2) Not implemented in STD.CH
  1550.  
  1551.   Work Around(s)
  1552.  
  1553.   1 & 2) Edit MYNAME.CH lines per the following:
  1554.  
  1555. #command @ <row>, <col> GET <var> [PICTURE <pic>] ;
  1556.              [RANGE <lo>, <hi>] [WHEN <when>] ;
  1557. => ;
  1558.          SetPos(<row>, <col>) ;;
  1559.          AAdd( GetList, _GET_(<var>, <(var)>, <pic>, ;
  1560.         {|_1, _2| RangeCheck(_1, _2, <lo>, <hi>)}, <{when}>) )
  1561.  
  1562. #command @ <row>, <col> SAY <sayxpr> [PICTURE <saypic>] ;
  1563.          GET <var> [PICTURE <pic>] [RANGE <lo>, <hi>] [WHEN <when>] ;
  1564. => ;
  1565.          @ <row>, <col> SAY <sayxpr> [PICTURE <saypic>] ;;
  1566.          @ Row(), Col()+1 GET <var> [PICTURE <pic>] ;
  1567.           [RANGE <lo>, <hi>] [WHEN <when>];
  1568.  
  1569.   Note:
  1570.  
  1571.   The documentation lists the useage as RANGE or VALID. The above two
  1572.   changes bring the action into compliance with the documentation. The
  1573.   following 4 changes to MYNAME.CH, submitted by John Beckner, will
  1574.   permit both RANGE and VALID to be used concurrently:
  1575.  
  1576.  #command @ <row>, <col>;
  1577.           GET <var> [PICTURE <getpic>] [WHEN <when>] [RANGE <lo>, <hi>];
  1578.  =>;
  1579.           @ <row>, <col> GET <var> [PICTURE <getpic>] [WHEN <when>];
  1580.           [VALID {|_1| _1 >= <lo> .and. _1 <= <hi>}]
  1581.  
  1582.  #command @ <row>, <col>;
  1583.           GET <var> [PICTURE <getpic>] [WHEN <when>];
  1584.           [RANGE <lo>, <hi> VALID <valid>];
  1585.  =>;
  1586.           @ <row>, <col> GET <var> [PICTURE <getpic>] [WHEN <when>];
  1587.           [VALID {|_1| (<valid>) .and. _1 >= <lo> .and. _1 <= <hi>}]
  1588.  
  1589.  #command @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];
  1590.           GET <var> [PICTURE <getpic>] [WHEN <when>] [RANGE <lo>, <hi>];
  1591.  =>;
  1592.           @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];;
  1593.           @ <row>, col()+1 GET <var> [PICTURE <getpic>] <WHEN <when>];
  1594.           [VALID {|_1| _1 >= <lo> .and. _1 <= <hi>}]
  1595.  
  1596.  #command @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];
  1597.           GET <var> [PICTURE <getpic>] [WHEN <when>];
  1598.           [RANGE <lo>, <hi> VALID <valid>];
  1599.  =>;
  1600.           @ <row>, <col> SAY <sayexpr> [PICTURE <saypic>];;
  1601.           @ <row>, col()+1 GET <var> [PICTURE <getpic>] [WHEN <when>];
  1602.           [VALID {|_1| (<valid>) .and. _1 >= <lo> .and. _1 <= <hi>}]
  1603.  
  1604.   seealso "STD.CH"
  1605.  
  1606. ----------------------------------------------------------------------------
  1607. READ              Command documentation.
  1608.  
  1609.   Clipper Version  1.03 dtd 09/15/90.
  1610.  
  1611.   Problem Statement
  1612.  
  1613.   READ command documentaion re' Navigation Keys is incorrect.
  1614.  
  1615.   Cause
  1616.  
  1617.   Incorrect documentation.
  1618.  
  1619.   Work Around(s)
  1620.  
  1621.   1) Annotate your documentation as follows:
  1622.  
  1623.      \hTable 4-9: READ Navigation Keys\e
  1624.      ───────────────────────────────────────────────────────────────────────────
  1625.      \hKey                                Action\e
  1626.      ───────────────────────────────────────────────────────────────────────────
  1627.      Leftarrow                          Character left. Does not move cursor
  1628.                                         to previous GET
  1629.      Rightarrow, Ctrl-D                 Character right. Does not move cursor
  1630.                                         to next GET
  1631.      Ctrl-Leftarrow, Ctrl-Z             Word left
  1632.      Ctrl-Rightarrow, Ctrl-B            Word right
  1633.      Uparrow, Ctrl-E                    Previous GET
  1634.      Dnarrow, Ctrl-X, Return, Ctrl-M    Next GET
  1635.      Home, Ctrl-A                       First character of GET
  1636.      End, Ctrl-F                        Last character of GET
  1637.      Ctrl-Home, Ctrl ]                  Beginning of first GET
  1638.   *  Ctrl-End, Ctrl-W                   Beginning of last GET
  1639.                             OR          Terminate READ saving current GET
  1640.      ───────────────────────────────────────────────────────────────────────────
  1641.  
  1642.      \hTable 4-12: READ Exit Keys\e
  1643.      ───────────────────────────────────────────────────────────────────────────
  1644.      \hKey                         Action\e
  1645.      ───────────────────────────────────────────────────────────────────────────
  1646.      Ctrl-C, PgUp, PgDn          Terminate READ saving current GET
  1647.   *  Ctrl-End, Ctrl-W            Terminate READ saving current GET
  1648.                            OR    Beginning of last GET
  1649.      Ctrl-W, Ctrl-C, PgUp, PgDn  Terminate READ saving current GET
  1650.      Return, Ctrl-M              Terminate READ from last GET
  1651.      Esc                         Terminate READ without saving current GET
  1652.      Uparrow                     Terminate READ from first GET if
  1653.                                  READEXIT()=.T.
  1654.      Dnarrow                     Terminate READ from last GET if
  1655.                                  READEXIT()=.T.
  1656.      ───────────────────────────────────────────────────────────────────────────
  1657.  
  1658.   Note:  Action of Ctrl-End, Ctrl-W is dependent upon whether or not
  1659.            NOTDEF is defined in GETSYS.PRG.
  1660.  
  1661.   seealso "GETSYS.PRG"
  1662.  
  1663. ----------------------------------------------------------------------------
  1664. REINDEX           Does not re-create index file header.
  1665.  
  1666.   Clipper Version  1.03 dtd 09/15/90.
  1667.  
  1668.   Problem Statement
  1669.  
  1670.   REINDEX uses the existing index file header. If this is corrupted,
  1671.   the resultant index file will also be invalid.
  1672.  
  1673.   Cause
  1674.  
  1675.   Unknown.
  1676.  
  1677.   Work Around(s)
  1678.  
  1679.   1) Use INDEX ON to create new indices. Some users have suggested
  1680.      erasing the existing index file prior to INDEX ON usage.
  1681.  
  1682.   seealso "INDICES" "PACK"
  1683.  
  1684. ----------------------------------------------------------------------------
  1685. REPORT FORM       Anomalies with Report forms.
  1686.  
  1687.   Clipper Version  1.03 dtd 09/15/90.
  1688.  
  1689.   Problem Statement
  1690.  
  1691.   1) REPORT FORM will not display character report fields which are
  1692.      4 or less characters, unless the field width is set to five.
  1693.  
  1694.   2) The expression *** Total *** is appended to a report containing
  1695.      numeric fields, whether or not totals are requested. If group
  1696.      action is elected, ** Subtotal ** and * Subsubtotal * will
  1697.      show in the report, whether or not totals are requested.
  1698.  
  1699.   3) REPORT FORM will not print a report which does not contain at
  1700.      least one character field.
  1701.  
  1702.   Cause
  1703.  
  1704.   1) FRMRUN.PRG. MLCOUNT() and MEMOLINE() do not work with a linelength
  1705.      parameter less than 4.
  1706.  
  1707.   2) FRMRUN.PRG programming error.
  1708.  
  1709.   3) FRMRUN.PRG programming error.
  1710.  
  1711.   Work Around(s)
  1712.  
  1713.   1) Set report field width to 5 for character fields less than 5
  1714.      characters OR re-program FRMRUN.PRG as follows:
  1715.  
  1716.      XMEMOLINE Function:
  1717.  
  1718.      IF nLineLength < 5
  1719.        RETURN ( SUBSTR(cString, nLineLength * (nLineNumber-1) + 1,;
  1720.                 nLineLength) )
  1721.      ELSE
  1722.        RETURN( MEMOLINE( cString, nLineLength, nLineNumber, nTabSize,
  1723.                lWrap ) )
  1724.      ENDIF
  1725.  
  1726.      XMLCOUNT Function:
  1727.  
  1728.      IF nLineLength < 5
  1729.        RETURN ( INT(LEN(cString) / nLineLength) + ;
  1730.               IF( LEN(cstring) % nLineLength == 0, 0, 1 ) )
  1731.      ELSE
  1732.        RETURN( MLCOUNT( cString, nLineLength, nTabSize, lWrap ) )
  1733.      ENDIF
  1734.  
  1735.   2) Define a STATIC variable, say totalflag. Set this flag to .F. in
  1736.      the __ReportForm function, after the LOCAL statements. Reset this
  1737.      flag in the "// Column total elements" loop:
  1738.  
  1739.        IF aReportData[RP_COLUMNS,nCol,RC_TOTAL]  // reference
  1740.          totalflag := .t.                        // add
  1741.          FOR nGroup := 1 TO LEN(aReportTotals)   // reference
  1742.  
  1743.      and apply this flag as desired throughout the program. Compile
  1744.      and link with your programs requiring this function.
  1745.  
  1746.   3) Modify FRMRUN.PRG, about line 380, as follows:
  1747.  
  1748.    // Only run through the record detail if this is NOT a summary report
  1749.    IF !aReportData[ RP_SUMMARY ]
  1750.       // Determine the max number of lines needed by each expression
  1751.       nMaxLines := 1  // Changed from 0 to 1.
  1752.       FOR nCol := 1 TO LEN(aReportData[RP_COLUMNS])
  1753.         ....
  1754.  
  1755.   seealso "NOCONSOLE" "SET CONSOLE"
  1756.  
  1757. ----------------------------------------------------------------------------
  1758. RESERVED WORDS    Comments on reserved words.
  1759.  
  1760.   Clipper Version  1.03 dtd 09/15/90.
  1761.  
  1762.   Problem Statement
  1763.  
  1764.   Numerous users have reported problems which have been traced to the
  1765.   use of variable names which conflict with Clipper 5.0 commands or
  1766.   statements.
  1767.  
  1768.   Work Around(s)
  1769.  
  1770.   Exercise caution in the choice of variable names. Remember, if your
  1771.   variable name is four characters long and these characters match the
  1772.   first four letters of a Clipper 5.0 or UDC command, you've got problems.
  1773.   Just avoid this situation as well as names that match Clipper 5.0
  1774.   commands and statements. Remember also, If you create a UDF of the same
  1775.   name as a Clipper 5.0 function, its action will supersede Clipper's.
  1776.  
  1777. ----------------------------------------------------------------------------
  1778. RESTORE           ADDITIVE parameter unreliable.
  1779.  
  1780.   Clipper Version  1.03 dtd 09/15/90.
  1781.  
  1782.   Problem Statement
  1783.  
  1784.   RESTORE FROM <memfile> ADDITIVE may corrupt Public/Private variables.
  1785.  
  1786.   Cause
  1787.   Unknown. To be 'fixed' by Nantucket(r).
  1788.  
  1789.   Work Around(s)
  1790.  
  1791.   Use some other method of storing / retrieving variables; e.g., a .dbf
  1792.   file.
  1793.  
  1794. ----------------------------------------------------------------------------
  1795. RIGHT()           Returns runtime error if embedded in a macro.
  1796.  
  1797.   Clipper Version  1.03 dtd 09/15/90.
  1798.  
  1799.   Problem Statement
  1800.  
  1801.   When RIGHT(cVar) is included in a macro statement, a runtime
  1802.   error occurs when the macro is expanded.
  1803.  
  1804.   Cause
  1805.  
  1806.   RIGHT(cVar) is a psuedo-function, created by directive in STD.CH; i.e.,
  1807.  
  1808.         #translate Right(<c>, <n>)  =>   Substr( <c>, -(<n>), <n>)
  1809.  
  1810.   Work Around(s)
  1811.  
  1812.   1) Create a real function, RIGHT(cVar), in your .PRG; e.g.,
  1813.             FUNCTION ALLTRIM
  1814.             PARAMETERS cVar, nVar
  1815.             RETURN  SUBSTR(cVar, -nVar, nVar)
  1816.  
  1817.   2) Create the above function and compile using the /N option.
  1818.      Include the resultant .OBJ file when linking.
  1819.      Note: You may delete the #translate line from MYNAME.CH.
  1820.  
  1821.   3) Create the above function and compile using the /N option.
  1822.      Add the resultant .OBJ file to a .LIB file; e.g., EXTEND.LIB.
  1823.      Note: You may delete the #translate line from MYNAME.CH.
  1824.  
  1825.   4) Replace all RIGHT(cVar) references in your .PRG with
  1826.      SUBSTR(cVar, -nVar, nVar).
  1827.  
  1828.   Note
  1829.  
  1830.   See Support Bulletin 4 in the NANFORUM Library.
  1831.  
  1832.   seealso "ALLTRIM()" "STD.CH"
  1833.  
  1834. ----------------------------------------------------------------------------
  1835. ROUND()           Returns unpredictable results.
  1836.  
  1837.   Clipper Version  1.03 dtd 09/15/90.
  1838.  
  1839.   Problem Statement
  1840.  
  1841.   The ROUND() function, like its predecessor in S'87, does not return
  1842.   the desired result, in certain cases.
  1843.  
  1844.   Cause
  1845.   Unknown.
  1846.  
  1847.   Work Around(s)
  1848.  
  1849.   The following function seems to do the trick:
  1850.  
  1851.   FUNCTION ROUNDIT(nNumber, nPlaces)
  1852.   nPlaces := IF( nPlaces == NIL, 0, nPlaces )
  1853.   RETURN IF(nNumber < 0.0, -1.0, 1.0) * ;
  1854.          INT( ABS(nNumber) * 10 ^ nPlaces + 0.50 + 10 ^ -12 ) / 10 ^ nPlaces
  1855.  
  1856.   Notes
  1857.   FYI, here are some particularly unique numbers:
  1858.     1.265   146.795   8.245   18.435   10.165   16.685
  1859.     1.025     4.645   8.155   35.105  286.335    4.515  4.225
  1860.  
  1861. ----------------------------------------------------------------------------
  1862. S50005.TXT        Nantucket(r) - Things that you should know.
  1863.  
  1864.   Clipper Version  1.03 dtd 09/15/90.
  1865.  
  1866.   Problem Statement
  1867.  
  1868.   Nantucket(r) has issued Support Bulletin, S50005.TXT, available in
  1869.   NANFORUM LIB 16, which lists comments and workarounds concerning the
  1870.   following subjects.
  1871.  
  1872.      1) Duplicate fields in a COPY TO command
  1873.      2) BEGIN SEQUENCE...END with multiple GETS
  1874.      3) SET KEY and undefined functions
  1875.      4) Translation rules
  1876.      5) Displaying long gets
  1877.      6) Omitting spaces before macros
  1878.      7) TBrowse limit exceeded
  1879.      8) Passing color strings by reference to SETCOLOR()
  1880.      9) 00/00/00 is an invalid date
  1881.  
  1882.   Cause
  1883.   Unknown.
  1884.  
  1885.   Work Around(s)
  1886.  
  1887.   See subject document.
  1888.  
  1889. ----------------------------------------------------------------------------
  1890. SET COLOUR        Incorrect syntax in STD.CH.
  1891.  
  1892.   Clipper Version  1.03 dtd 09/15/90.
  1893.  
  1894.   Problem Statement
  1895.  
  1896.   SET COLOUR directives in STD.CH need to be changed to enable
  1897.   command recognition.
  1898.  
  1899.   Cause
  1900.   Incorrect programming.
  1901.  
  1902.   Work Around(s)
  1903.  
  1904.   Edit the SET COLOUR lines, in MYNAME.CH, to read as follows:
  1905.  
  1906.   #command  SET COLOUR TO [<*spec*>]   =>  SetColor( #<spec> )
  1907.   #command  SET COLOUR TO ( <c> )      =>  SetColor( <c> )
  1908.  
  1909.   seealso "STD.CH" "MISC"
  1910.  
  1911. ----------------------------------------------------------------------------
  1912. SET CONSOLE OFF   Turned back on by REPORT | LABEL FORM TO ...
  1913.  
  1914.   Clipper Version  1.03 dtd 09/15/90.
  1915.  
  1916.   Problem Statement
  1917.  
  1918.   When SET CONSOLE OFF is used prior to a REPORT | LABEL FORM <formname>
  1919.   TO PRINT | FILE, it appears to be ignored.
  1920.  
  1921.   Cause
  1922.  
  1923.   Syntactical ommissions in documentation. Note: FRMRUN.PRG | LBLRUN.PRG
  1924.   programming uses the presence | absence of a NOCONSOLE parameter to
  1925.   SET CONSOLE accordingly.
  1926.  
  1927.   Work Around(s)
  1928.  
  1929.   1) Change documentation to reflect addition of this parameter:
  1930.     REPORT | LABEL FORM <xcReport> [TO PRINTER] [TO FILE <xcFile>][<scope>]
  1931.     [WHILE <lCondition>] [FOR <lCondition>][PLAIN | HEADING <cHeading>]
  1932.     [NOEJECT] [SUMMARY] [NOCONSOLE]
  1933.  
  1934.   2) Use NOCONSOLE in Clipper 5.0 programs.
  1935.  
  1936.   3) Change the following lines:
  1937.  
  1938.      FRMRUN.PRG:
  1939.  
  1940.        *  lConsoleOn := SET( _SET_CONSOLE, !lNoConsole )
  1941.        lConsoleOn := IF( !lNoConsole, SET(_SET_CONSOLE),;
  1942.                         SET(_SET_CONSOLE, .F.) )
  1943.      LBLRUN.PRG
  1944.        *  LOCAL lConsoleOn := .T.          // CONSOLE status
  1945.        LOCAL lConsoleOn                 // CONSOLE status
  1946.  
  1947.        *  IF lConsole == NIL
  1948.        *   lConsole := .T.
  1949.        *  ENDIF
  1950.  
  1951.        *  IF lConsole              // To the screen
  1952.        *   lConsoleOn := SET( _SET_CONSOLE, lConsole )
  1953.        *  ENDIF
  1954.        lConsoleOn := IF( !lNoConsole, SET(_SET_CONSOLE),;
  1955.                         SET(_SET_CONSOLE, .F.) )
  1956.  
  1957.      Compile and link these programs with your program when these
  1958.      functions are required.
  1959.  
  1960.   seealso "NOCONSOLE"
  1961.  
  1962. ----------------------------------------------------------------------------
  1963. SET RELATION      Anomalies reported using this command.
  1964.  
  1965.   Clipper Version  1.03 dtd 09/15/90.
  1966.  
  1967.   Problem Statement
  1968.  
  1969.   SET RELATION TO ... INTO ...  The following two anomalies have been
  1970.   reported:
  1971.  
  1972.     1) Corruption of a child index when replacing non-key child fields.
  1973.  
  1974.     2) Deleted records are not recognized as deleted in the child.
  1975.  
  1976.   Cause
  1977.  
  1978.   Unknown.
  1979.  
  1980.   Work Around(s)  Note: Assumes Parent is selected.
  1981.  
  1982.   1) Select Child; SET ORDER TO 0; Replace; SET ORDER TO 1; Select Parent.
  1983.   2) Select Child; SEEK; select Parent - the SEEK command differentiates
  1984.      between deleted and non-deleted records.
  1985.  
  1986.   seealso "INDICES"
  1987.  
  1988. ----------------------------------------------------------------------------
  1989. SET TYPEAHEAD     Limited to 15 characters.                                ~
  1990.  
  1991.   Clipper Version  1.03 dtd 09/15/90.
  1992.  
  1993.   Problem Statement
  1994.  
  1995.   Various user tests have shown that setting the <nKeyBoardSize>
  1996.   parameter greater than 15 does not increase the size of the buffer.
  1997.  
  1998.   Cause
  1999.  
  2000.   Unknown.
  2001.  
  2002.   Work Around
  2003.  
  2004.   Unknown.
  2005.  
  2006. ----------------------------------------------------------------------------
  2007. SKIP ALIAS        <nWorkArea> case mis-translated.                         ~
  2008.  
  2009.   Clipper Version  1.03 dtd 09/15/90.
  2010.  
  2011.   Problem Statement
  2012.  
  2013.   SKIP ALIAS (nWorkArea) is translated by the pre-processor to:
  2014.             __dbSkip( alias (nWorkArea) )  which is incorrect.
  2015.  
  2016.   Cause
  2017.  
  2018.   Ordering of SKIP translations in STD.CH
  2019.  
  2020.   Work Around
  2021.  
  2022.   Change the order of the SKIP translations in MYNAME.CH as follows:
  2023.   // old
  2024.   // #command SKIP ALIAS <a>       =>  <a> -> ( __dbSkip(1) )
  2025.   // #command SKIP <n> ALIAS <a>   =>  <a> -> ( __dbSkip(<n>) )
  2026.   // #command SKIP <n>             =>  __dbSkip( <n> )
  2027.   // #command SKIP                 =>  __dbSkip(1)
  2028.  
  2029.   // new
  2030.   #command SKIP <n>                =>  __dbSkip( <n> )
  2031.   #command SKIP ALIAS <a>          =>  <a> -> ( __dbSkip(1) )
  2032.   #command SKIP <n> ALIAS <a>      =>  <a> -> ( __dbSkip(<n>) )
  2033.   #command SKIP                    =>  __dbSkip(1)
  2034.  
  2035.   SKIP ALIAS (nWorkArea) will then be correctly translated to:
  2036.          (nWorkArea) -> ( __dbSkip(1) )
  2037.  
  2038. ----------------------------------------------------------------------------
  2039. SORT ON <number>  Produces incorrect result with negative numbers.
  2040.  
  2041.   Clipper Version  1.03 dtd 09/15/90.
  2042.  
  2043.   Problem Statement
  2044.  
  2045.   When SORT is used on a number field, the result is incorrect if the
  2046.   file to be sorted contains negative numbers.
  2047.  
  2048.   Cause
  2049.  
  2050.   Unknown.
  2051.  
  2052.   Work Around(s)
  2053.  
  2054.   Unknown. Suggest using the function presented under INDICES to index
  2055.   the file and then use COPY.
  2056.  
  2057.   seealso "INDICES"
  2058.  
  2059. ----------------------------------------------------------------------------
  2060. STD.CH            Comments re' header file STD.CH
  2061.  
  2062.   STD.CH is a header file. The pseudo-functions therein are hard coded
  2063.   in CLIPPER.EXE; i.e., STD.CH is not automatically 'included' when a
  2064.   .PRG is compiled but its pseudo-functions are.
  2065.  
  2066.   It is suggested that users may wish to copy STD.CH to another file;
  2067.   e.g., MYNAME.CH; make changes as desired to MYNAME.CH, and force
  2068.   the inclusion of MYNAME.CH at compile time with the /UMYNAME.CH
  2069.   option. A header file included in this fashion will take precedence
  2070.   over the STD.CH pseudo-functions hard coded in CLIPPER.EXE.
  2071.  
  2072. ----------------------------------------------------------------------------
  2073. TEXT/ENDTEXT      Space after ENDTEXT causes compiler error.
  2074.  
  2075.   Clipper Version  1.03 dtd 09/15/90.
  2076.  
  2077.   Problem Statement
  2078.  
  2079.   If source code has a space following the ENDTEXT, the compiler will
  2080.   produce an error. The error may be C2033, Missing ENDTEXT or possibly,
  2081.   C3001 Memory Overbooked.
  2082.  
  2083.   Cause
  2084.  
  2085.   Unknown.
  2086.  
  2087.   Work Around(s)
  2088.  
  2089.   Remove white space after ENDTEXT
  2090.  
  2091. ----------------------------------------------------------------------------
  2092. TONE/ISPRINTER    Conflict with Tom Rettig Library, TR.LIB
  2093.  
  2094.   Clipper Version  1.03 dtd 09/15/90.
  2095.  
  2096.   Problem Statement
  2097.  
  2098.   Inclusion of the TONE() function in a program linked with TR.LIB,
  2099.   using RTLINK, produces an undefined symbol error; e.g., the following
  2100.   program:
  2101.      ? isprinter()
  2102.      ? tone()
  2103.  
  2104.   Cause
  2105.  
  2106.   Unknown.
  2107.  
  2108.   Work Around(s)
  2109.  
  2110.   Remove isprint from TR.LIB using a library manager; e.g., LIB.EXE.
  2111.  
  2112.   Notes
  2113.  
  2114.   Mr. Rettig will 'fix', subsequent to Nantucket's promised 'fix disk'.
  2115.  
  2116. ----------------------------------------------------------------------------
  2117. TYPE()            Comments on Clipper 5.0 return values.
  2118.  
  2119.   Clipper Version  1.03 dtd 09/15/90.
  2120.  
  2121.   Problem Statement
  2122.  
  2123.   1) TYPE("LocalVar" or "StaticVar") returns 'U'.
  2124.   2) TYPE("PrivateObject") returns 'A'.
  2125.  
  2126.   Cause
  2127.  
  2128.   1) TYPE("cVar") uses macro expansion to evaluate variables.
  2129.   2) Unknown.
  2130.  
  2131.   Work Around(s)
  2132.  
  2133.         Use VALTYPE(var)
  2134.  
  2135.   Notes
  2136.  
  2137.        TYPE("Undeclared_Var")      Returns 'U'
  2138.        VALTYPE("Undeclared_Var")   Returns runtime error
  2139.  
  2140. ----------------------------------------------------------------------------
  2141. USE READONLY      Network reports file opened in R/W mode.
  2142.  
  2143.   Clipper Version  1.03 dtd 09/15/90.
  2144.  
  2145.   Problem Statement
  2146.  
  2147.   A user has reported that his network reported file opened in R/W mode,
  2148.   despite use of READONLY parameter. This has been verified by Nantucket(r)
  2149.  
  2150.   Cause
  2151.  
  2152.   Unknown.
  2153.  
  2154.   Work Around(s)
  2155.  
  2156.   To be supplied by Nantucket(r).
  2157.  
  2158. ----------------------------------------------------------------------------
  2159. //<parameter>     Undocumented feature.
  2160.  
  2161.   Clipper Version  1.03 dtd 09/15/90.
  2162.  
  2163.   Feature Statement
  2164.  
  2165.   1) //INFO  Undocumented diagnostic feature. Create a program with the
  2166.      single command 'wait'. Compile and link. Execute the program with the
  2167.      parameter //INFO. This will illustrate the type of diagnostic
  2168.      information available; e.g.,
  2169.         Clipper (R) 5.0 Rev. 1.03 USASCII
  2170.         DS=4A80:0000  DS avail=40KB  OS avail=277KB  EMM avail=1536KB
  2171.         Press any key to continue...(Fixed Heap=21KB)
  2172.  
  2173.   2) // can also be used to SET CLIPPER parameters from the command line;
  2174.      e.g., Program //E0 //F31.
  2175.   Cause
  2176.  
  2177.   Documentation ommission.
  2178.  
  2179.   Work Around(s)
  2180.  
  2181.   Annotate your documentation.
  2182.  
  2183. ----------------------------------------------------------------------------
  2184. \INCLUDE          Comments on \CLIPPER5\INCLUDE\ Files.
  2185.  
  2186.     The following header files in the \CLIPPER5\INCLUDE\ sub-directory
  2187.     should be included in .PRG files which need them.
  2188.  
  2189.     ACHOICE.CH              MEMOEDIT.CH
  2190.     BOX.CH                  SET.CH
  2191.     DBEDIT.CH               SETCURS.CH
  2192.     DBSTRUCT.CH             EXTEND.H     (5.0 with C)
  2193.     DIRECTRY.CH             EXTENDA.MAC  (A'86)
  2194.     ERROR.CH                EXTENDA.INC  (S'87)
  2195.     FILEIO.CH               EXTASM.INC   (C)
  2196.     INKEY.CH
  2197.  
  2198.     A special case is the STD.CH header file, also in this sub-directory.
  2199.  
  2200.   seealso "STD.CH"
  2201.  
  2202. ----------------------------------------------------------------------------
  2203. \LIB              Comments on \CLIPPER5\LIB\ Files.                        ~
  2204.  
  2205.     File notes:
  2206.  
  2207.     CLIPPER  LIB   Automatically linked with Rtlink unless overridden.
  2208.     DBFNTX   LIB   Automatically linked with Rtlink unless overridden.
  2209.     EXTEND   LIB   Automatically linked with Rtlink unless overridden.
  2210.     TERMINAL LIB   Included in BASE50.PLL
  2211.       _VDISPLAY.........SCR
  2212.       _VKEYBOARD........KEYBD
  2213.       _VMOUSE...........MOUSE
  2214.     EXTENDLI ORG
  2215.     CLD      LIB
  2216.     RTLUTILS LIB
  2217.  
  2218.   Function Location Changes
  2219.  
  2220.     S'87 EXTEND.LIB              5.0 LOCATION
  2221.  
  2222.   AFIELDS                        CLIPPER.LIB
  2223.   ALLTRIM                        CLIPPER.EXE (STD.CH)
  2224.   HEADER                         CLIPPER.LIB
  2225.   LEFT                           CLIPPER.LIB
  2226.   LUPDATE                        CLIPPER.LIB
  2227.   NEXTKEY                        CLIPPER.LIB
  2228.   RECSIZE                        CLIPPER.LIB
  2229.   RESTSCREEN                     CLIPPER.LIB
  2230.   RIGHT                          CLIPPER.EXE (STD.CH)
  2231.   SAVESCREEN                     CLIPPER.LIB
  2232.   SETCOLOR                       CLIPPER.LIB
  2233.   VERSION                        CLIPPER.LIB
  2234.  
  2235.   Lo-level file routines
  2236.   The following functions are in EXTEND.LIB, not CLIPPER.LIB as stated
  2237.   in the documentation:
  2238.        FCLOSE  FCREATE   FERASE   FERROR  FOPEN
  2239.        FREAD   FREADSTR  FRENAME  FSEEK   FWRITE
  2240.  
  2241. ----------------------------------------------------------------------------
  2242. \SOURCE\SYS       Comments on \CLIPPER5\SOURCE\SYS\ Files.
  2243.  
  2244.    The following files in the \CLIPPER5\SOURCE\SYS sub-directory
  2245.    are hard coded in CLIPPER.EXE. They may be modified, compiled
  2246.    and linked to make changes.
  2247.  
  2248.     FRMDEF.CH                   LBLBACK.PRG
  2249.     FRMBACK.PRG                 LBLRUN.PRG
  2250.     FRMRUN.PRG                  ERRORSYS.PRG
  2251.     LBLDEF.CH                   GETSYS.PRG
  2252.  
  2253.